package com.ruoyi.service.impl;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.domain.SummaryContent;
import com.ruoyi.mapper.SummaryContentMapper;
import com.ruoyi.service.SummaryContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SummaryContentServiceImpl implements SummaryContentService {

    @Autowired
    private SummaryContentMapper summaryContentMapper;

    @Override
    public R submitSummaryContent(SummaryContent summaryContent) {
        summaryContentMapper.addSummary(summaryContent);
        return R.ok();
    }

    @Override
    public R getSummary(String caseId) {
        return R.ok(summaryContentMapper.getSummary(caseId));
    }

    @Override
    public R updateSummary(SummaryContent summaryContent) {
        summaryContentMapper.updateSummary(summaryContent);
        return R.ok();
    }
}
